package model;

public class Student {
    private String studentId; // 学号
    private String name;      // 姓名
    private String gender;    // 性别
    private String grade;     // 年级
    private String major;     // 专业
    private String password;  // 密码

    // 无参构造函数
    public Student() {}

    // 带参构造函数
    public Student(String studentId, String name, String gender, String grade, String major, String password) {
        this.studentId = studentId;
        this.name = name;
        this.gender = gender;
        this.grade = grade;
        this.major = major;
        this.password = password;
    }

    // Getter 和 Setter
    public String getStudentId() {
        return studentId;
    }
    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }
    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getGrade() {
        return grade;
    }
    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getMajor() {
        return major;
    }
    public void setMajor(String major) {
        this.major = major;
    }

    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }

    // 打印对象信息
    @Override
    public String toString() {
        return "Student{" +
                "studentId='" + studentId + '\'' +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", grade='" + grade + '\'' +
                ", major='" + major + '\'' +
                ", password='" + password + '\'' +
                '}';
    }

    public String getId() {
        return studentId;
    }
}
